﻿using System.Text;

namespace Tumblr.API.PostType
{
    public class Link : Common
    {
        private string _sName;
        private string _sUrl;
        private string _sDescription;

        public string Name
        {
            get
            {
                return _sName;
            }
            set
            {
                _sName = System.Web.HttpUtility.UrlEncode(value, Encoding.UTF8);
            }
        }

        public string Url
        {
            get
            {
                return _sUrl;
            }
            set
            {
                _sUrl = value;
            }
        }

        public string Description
        {
            get
            {
                return _sDescription;
            }
            set
            {
                string s = value.Replace("\r", "");
                s = s.Replace("\n", "");
                _sDescription = System.Web.HttpUtility.UrlEncode(s, Encoding.UTF8);
            }
        }
    }
}